package com.bj58.mis.apm.collector.jvm;

import com.bj58.mis.apm.client.core.BaseCollectLog;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class JVMModel extends BaseCollectLog {
    private Map<String,Long> classLoadingInfo=new HashMap<String,Long>();
    private List<Map<String,String>> gc=new ArrayList<Map<String,String>>();
    private List<Map<String,String>> memoryPool=new ArrayList<Map<String,String>>();
    private Map<String,Long>  heap=new HashMap<String,Long>();
    private Map<String,Long>  nonHeap=new HashMap<String,Long>();
    private Map<String,Long> threadInfo=new HashMap<String,Long>();
    private String version="";
    private String vendor="";
    private String javahome="";

    public Map<String, Long> getThreadInfo() {
        return threadInfo;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    public String getJavahome() {
        return javahome;
    }

    public void setJavahome(String javahome) {
        this.javahome = javahome;
    }

    public Map<String, Long> getClassLoadingInfo() {
        return classLoadingInfo;
    }

    public List<Map<String, String>> getGc() {
        return gc;
    }

    public List<Map<String, String>> getMemoryPool() {
        return memoryPool;
    }

    public Map<String, Long> getHeap() {
        return heap;
    }

    public Map<String, Long> getNonHeap() {
        return nonHeap;
    }

    @Override
    public String getCollectType() {
        return "jvm";
    }

    @Override
    public String toString() {
        Gson gson=new Gson();
        return gson.toJson(this);
    }
}
